﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;

namespace GieldaCSharp
{
    class WykresTlo : Wykres
    {
        public WykresTlo(Border _b, int odBack, int doBack) 
        {
            iOd = odBack;
            iDo = doBack;
            b = _b;
        }

        public override void Draw(PictureBox p, Graphics g, double maxY, double minY, int N)
        {
            int minXb = PrzeskalujX(iOd, N);
            int maxXb = PrzeskalujX(iDo, N);

            Rectangle rec = new Rectangle(minXb, b.minYn, (maxXb - minXb), (b.maxYn - b.minYn));
            g.FillRectangle(Brushes.Lavender, rec);

        }
    }
}
